package com.test.sb.xml.controller;

import com.test.sb.xml.domain.SysUser;
import com.test.sb.xml.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {


    @Autowired
    private UserMapper userMapper;

    @GetMapping("/test1")
    public void test1(){
        SysUser sysUser = userMapper.selectById(1L);
        System.out.println(sysUser.toString());

        List<SysUser> all = userMapper.findAll();
        for (SysUser user : all){
            System.out.println(user.toString());
        }
    }

}
